<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="simplecomet.js"></script>
<script type="text/javascript" src="excuses.js"></script>
<script type="text/javascript" src="urlcode.js"></script>
<script type="text/javascript">
var xhr = new XMLHttpRequest();
function send(nick, msg) {
	xhr.open("get", "http://192.168.1.210:9000/Hello.chat?opt=send&nick="+ getnick() + "&msg=" + getmsg(), true);
	xhr.onreadystatechange = function() {
		//alert('readyState:'+xhr.readyState+":"+'responseText:'+xhr.responseText);
	};
	xhr.send(null);
};
function getmsg() {
	return document.getElementById('msg').value;
};
function getnick() {
	return document.getElementById('nick').value;
};
</script>
<style type="text/css">
	ul{
		margin:0px;
		padding:0px;
	}
	ul li{
		float:left;
		list-style:none;
		line-height:20px;
		width:400px;
	}
</style>


<title>Insert title here</title>
</head>
<body>

	<div style="width: 400px; height: 100px; overflow: auto;border: 2px;">
		<ul id="chatlist">
			<li>Hello</li>
			<li>please press start button to start!</li>
		</ul>
	</div>

	<input id="control" type="submit" onclick="toggle();" value="start">
	<input type="text" id="nick">
	<input type="text" id="msg">
	<input id="control" type="submit" onclick="send('guxuede');" value="发送">
</body>
</html>
